package com.ccom.ccomstart.listener;

import com.ccom.ccomstart.properties.JasyptProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @auther: jjzhang24
 * @date: 2021年12月13日
 */
@Component
public class ApplicationStartUp implements ApplicationListener<ContextRefreshedEvent> {

    @Autowired
    private JasyptProperties jasyptProperties;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        System.out.println(jasyptProperties.getAlgorithm());
//        System.out.println(algorithm);
//        System.out.println("Jastpt解密后密码为：" + jasyptProperties.decrypt(jasyptProperties.getPassword()));
    }
}
